<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Duyệt đơn sinh viên</title>
        <LINK REL="SHORTCUT ICON" href="<?php echo base_url(); ?>public/img/icon-logo.jpg"/>
        <link href="<?php echo base_url(); ?>public/css/Style-19-3.css" rel="stylesheet" type="text/css" />
        <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>public/css/style.css"/>
        <link rel="stylesheet" href="<?php echo base_url(); ?>public/js/themes/base/jquery.ui.all.css"/>
        <script src="<?php echo base_url(); ?>public/js/jquery-1.10.2.js"></script>
        <script src="<?php echo base_url(); ?>public/js/ui/jquery.ui.core.js"></script>
        <script src="<?php echo base_url(); ?>public/js/ui/jquery.ui.widget.js"></script>
        <script src="<?php echo base_url(); ?>public/js/ui/jquery.ui.button.js"></script>
        <script src="<?php echo base_url(); ?>public/js/ui/jquery.ui.position.js"></script>
        <script src="<?php echo base_url(); ?>public/js/ui/jquery.ui.menu.js"></script>
        <script	src="<?php echo base_url(); ?>public/js/ui/jquery.ui.accordion.js"></script>
        <style type="text/css">
            .donduyet{
                width:1200px;
                margin: 0 auto;
                background-color: white;
                height: 1200px;
            }
            table,th,td{
                border: 1px solid black;
                border-collapse: collapse;
            }
            th{
                background: #0074c7;
                color: white;
                height: 30px;
                text-align: left;
                margin-left: 10px;
            }
            tr.id-silent{
                background-color: #0074c7;
            }
            th.silent1{
                width: 300px;
            }
            th.silent2{
                width: 150px;
            }
            th.silent3{
                width: 100px;
            }
            th.silent4{
                width: 150px;
            }
            th.silent5{
                width: 120px;
            }
            td p{
                margin: 5px 5px;
            }
            .donduyet p.page{
                float: right;   
            }
            .list-ds{
                margin: 10px 45px;
            }
            .list-ds h1{
                text-align: center;
                margin-bottom: 5px;
            }
            .list-ds p.report{
                text-align: center;
            }
            .list-ds p.report a{
                text-decoration: none; 
                color: black;
            }
            .list-donin{

            }
            .list-donin{
                margin: 10px 45px;
            }
            .list-donin h1{
                text-align: center;
                margin-bottom: 5px;
            }
            .list-donin p.report{
                text-align: center;
            }
            .list-donin p.report a{
                text-decoration: none; 
                color: black;
            }
        </style>

    </head>
    <body class="body-contaiter">
        <div class="donduyet">
            <div class="top-contaiter">
                <?php
                $this->load->view('canbo/cb-banner');
                ?>
                <div id="nav-top">
                    <img  id="icon" src="<?php echo base_url(); ?>public/img/logo-nav.png" alt="Quan ly ho so"/>
                    <div class="nav-nav">
                        <h1 style="color: white;">DUYỆT GIẤY TỜ, BIỂU MẪU </h1>
                    </div> <!--end .nav-nav-->
                </div><!--end.nav-top-->
            </div><!--end .top-container-->
            <div class="list-ds">
                <h1>Danh sách các đơn chưa được duyệt</h1>
                <p style="text-align: center; margin: 5px 5px 10px 5px;">Có ( <a style="font-weight: bold;"><?php echo $count0; ?> </a>) đơn chưa duyệt </p>
                <table style="width: 1100px;">
                    <tr class="id-silent">
                        <th class="silent1">Mẫu đơn</th>
                        <th class="silent2">Người nộp</th>
                        <th class="silent3">MSSV</th>
                        <th class="silent4">Thời gian nộp</th>
                        <th class="silent5"></th>
                    </tr>
                    <?php
                    if ($dsdonduyet != NULL) {
                        foreach ($dsdonduyet as $key => $value) {
                            ?>
                            <tr id="id-silent" >
                                <td class="silent1"><p> <?php echo $value['TenBieuMau']; ?></p></td>
                                <td class="silent2"><p> <?php echo $value['HoTen_SV']; ?></p></td>
                                <td class="silent3"><p> <?php echo $value['FK_Ma_SV']; ?></p></td>
                                <td class="silent4"><p> <?php echo $value['NgayLap']; ?> </p></td>                                 
                                <td class="silent5">

                                    <form action="<?php echo base_url(); ?>canbo/duyet2" method="POST">
                                        <input type="hidden" name="Ma_Don_SV" value="<?php echo $value['Ma_Don_SV']; ?>" />
                                        <button type="submit" name="bt1" value="1" >Xét Duyệt</button>
                                    </form>
                                    <?php
                                }
                            }
                            ?>
                        </td>
                    </tr>


                </table>

            </div><!--end .list-ds-->
            <div class="list-donin">
                <h1>Danh sách các đơn in lấy dấu</h1>
                <p style="text-align: center; margin: 5px 5px 10px 5px;">Có ( <a style="font-weight: bold;"><?php echo $count0; ?> </a>) đơn chưa duyệt </p>
                <table style="width: 1100px;">
                    <tr class="id-silent">
                        <th class="silent1">Mẫu đơn</th>
                        <th class="silent2">Người nộp</th>
                        <th class="silent3">MSSV</th>
                        <th class="silent4">Thời gian nộp</th>
                        <th class="silent5"></th>
                    </tr>

                    <?php
                    if (isset($dsdonin)) {
                        foreach ($dsdonin as $key => $value) {
                            ?>
                            <tr id="id-silent" >
                                <td class="silent1"><p> <?php echo $value['TenBieuMau']; ?></p></td>
                                <td class="silent2"><p> <?php echo $value['HoTen_SV']; ?></p></td>
                                <td class="silent3"><p> <?php echo $value['FK_Ma_SV']; ?></p></td>
                                <td class="silent4"><p> <?php echo $value['NgayLap']; ?> </p></td>                                 
                                <td class="silent5">
                                    <input type="checkbox" name="ds_donin[]" value="<?php echo $value['Ma_Don_SV']; ?>"/>
                                </td>
                                <?php
                            }
                        }
                        ?>
                        <form action="<?php echo base_url(); ?>canbo/intatdon" method="POST">
                            <?php
                              echo form_dropdown('Ma_BieuMau',$dsmabieumau);
                            ?>
                            <button type="submit" >In đơn</button>
                        </form>
                    </tr>


                </table>

            </div><!--end .list-ds-->
        </div><!--end .donduyet-->

    </body>
</html>

